<?php

namespace App\Models;

use App\Models\Base\WorkTicketImage as BaseWorkTicketImage;

/**
 * 
 *
 * @property int $id
 * @property int $work_ticket_id 工单id
 * @property int $work_ticket_detail_id 工单详情id
 * @property string $path 图片路径
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @property-read \App\Models\WorkTicket|null $workTicket
 * @property-read \App\Models\WorkTicketDetail|null $workTicketDetail
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage query()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage wherePath($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage whereWorkTicketDetailId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage whereWorkTicketId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage withTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketImage withoutTrashed()
 * @mixin \Eloquent
 */
class WorkTicketImage extends BaseWorkTicketImage
{
	protected $fillable = [
		self::WORK_TICKET_ID,
		self::WORK_TICKET_DETAIL_ID,
		self::PATH
	];

	public function workTicket()
	{
		return $this->belongsTo(WorkTicket::class, self::WORK_TICKET_ID);
	}

	public function workTicketDetail()
	{
		return $this->belongsTo(WorkTicketDetail::class, self::WORK_TICKET_DETAIL_ID);
	}
}
